﻿<!DOCTYPE html>
<html class="detailsHtml" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<title>安全警示室1</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<link rel="icon" href="/frontEnd/images/favicon.ico">
		<link rel="stylesheet" type="text/css" href="/frontEnd/css/style.css" />
    </head>
    <body>
        <div class="boxCenter">
			<h1 class="title" style="border-bottom: 0;"><a href="javascript:history.back(-1);"><img src="/frontEnd/images/return.png"/></a> </h1>
			<div class="boxCenter box">
				<h1 class="title" id="caseTitle"></h1>
        	<div id="roll2">
        		<div class="detailsPage" id="page1" ></div>
        		<div class="coreXx" id="page2"></div>
        	</div>
        </div>
        <script src="/frontEnd/js/jquery-2.1.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="/layuicms/layui/layui.js"></script>
		<script th:inline="javascript">
            function previewVideo(url) {
                var html = '<div  class="wrap" style="height: 100%;background-color: #000;">';
                html += '<video  style="width: auto;margin: 0 auto;display: block;height: 100%;" autoplay="autoplay" preload="none" controls="controls" autobuffer="autobuffer"  loop="loop">';
                html += '<source src="/file/showImageByPath?path='+url+'" type="video/mp4" />';
                html += '</video>';
                html += '</div>';
                //弹出层
                layer.open({
                     type: 1,
                     title: false //不显示标题栏
                    ,shade: 0.8
                    ,area: ['1000px', '500px']
                    ,closeBtn :0
                    ,shade: 0,
                    content: html
                });
            }
            layui.use(['jquery','layer'],function(){
			var $ = layui.jquery;
			var layer = layui.layer;
            var list = [[${caseClassics}]]
            var dom=$("#page2");
            var html='';
            var load='';
            $.each(list,function(index,item){
                var URL =item.caseImage;
                var date = URL.substr(0,10);
                var url1 = URL.substr(11,URL.length);
                html+='<a  href="javascript:void(0)" onclick="previewVideo(\''+URL+'\')" style="width: 120px;"><img src="/frontEnd/images/video.jpg"/><span>'+item.classicTitle+'</span></a>'
            	});
            $(dom).append(html);
			var typename = [[${safetyTypeName}]]
			var caseTitle = "【"+typename+"】视频文件夹";
			$('#caseTitle').html(caseTitle).attr("class","title");
			$(document).ready(function () { }).keydown(
				function (e) {
					if (e.which === 27) {
						layer.closeAll();
					}
				});
            });
		</script>
    </body>
</html>